home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Environments / MacCjr / MacC Jr / Library Folder / C Include Folder / Dialog.h < prev    next >
Encoding:
Text File  |  1987-01-06  |  1.8 KB  |  100 lines  |  [TEXT/EDIT]

  1. // Dialog.h
  2. // © Copyright 1984 Consulair Corp, All Rights Reserved.
  3. // Portions © Copyright Apple Computer, Inc: 1982, 1983, 1984
  4. //            Stanford University, SUMEX project: 1984
  5. // Requires MacDefs.h, Quickdraw.h Window.h Textedit.h
  6.  
  7. #ifndef DialogLoaded
  8.  
  9.   #ifndef TextEditLoaded
  10.     #include "textedit.h"
  11.     #endif
  12.   
  13.   #define DialogLoaded
  14.  
  15. // Dialog Manager Defines
  16.   
  17.   #define    userItem    0
  18.   #define    ctrlItem    4
  19.  
  20. //  B0-B1: control kind
  21.   
  22.   #define    btnCtrl        0
  23.   #define    chkCtrl        1
  24.   #define    radCtrl        2
  25.   #define    resCtrl        3
  26.   
  27. // And item type
  28.   
  29.   #define    statText    8
  30.   #define    editText    16
  31.   #define    iconItem    32
  32.   #define    picItem        64
  33.   #define    itemDisable    128
  34.   
  35. // Standard Button IDs
  36.   
  37.   #define    oK        1
  38.   #define    cancel        2
  39.   
  40. // Dialog Manager structures
  41.   
  42.   struct __DR
  43.     {
  44.     WindowRecord window;
  45.     Handle    items;
  46.     TEHandle textH;
  47.     short    editField;
  48.     short    editOpen;
  49.     short    aDefItem;
  50.     };
  51.   
  52.   #define DialogRecord struct __DR
  53.   #define DialogPtr WindowPtr
  54.   typedef DialogRecord *DialogPeek;
  55.  
  56.   struct __DT
  57.     {
  58.     Rect    boundsRect;
  59.     short    procID;
  60.     char    visible;
  61.     char    filler1;
  62.     char    goAwayFlag;
  63.     char    filler2;
  64.     long    refCon;
  65.     short    itemsID;
  66.     Str255    title;
  67.     };
  68.   
  69.   #define DialogTemplate struct __DT
  70.   
  71.   typedef DialogTemplate * DialogTPtr;
  72.   typedef DialogTPtr * DialogTHndl;
  73.   
  74.   struct __AT
  75.     {
  76.     Rect    boundsRect;
  77.     short    itemsID;
  78.     long    stages;
  79.     };
  80.   
  81.   #define AlertTemplate struct __AT
  82.   
  83.   #define    boldItem    8
  84.   #define    boxDrawn    4
  85.   #define    stageShift    4
  86.   
  87.   typedef AlertTemplate * AlertTPtr;
  88.   typedef AlertTPtr * AlertTHndl;
  89.   
  90. // Functions returning other than integer
  91.   
  92.   #define GetNewDialog (DialogPtr)GetNewDialog
  93.   #define NewDialog (DialogPtr)NewDialog
  94.  
  95. // old spelling correction 
  96.  
  97.    #define DisposDialog(dialogPointer)  DisposeDialog(dialogPointer)
  98.   
  99. #endif
  100.